Public Class TabStripDynamic
	Inherits System.Web.UI.Page

    Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
        MyBase.OnInit(e)
        DotNetNuke.UI.Utilities.ClientAPI.HandleClientAPICallbackEvent(Me)
    End Sub

	Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		'Put user code to initialize the page here

		AddTab("1", "Tab 1")
		AddTab("2", "Tab 2")
		'Me.MyDNNTabStrip.Tabs(1).Visible = False
		AddTab("3", "Tab 3")
		'Me.MyDNNTabStrip.SelectedIndex = 2
	End Sub

	Private Sub AddTab(ByVal ID As Integer, ByVal Name As String)
		Dim objTab As DotNetNuke.UI.WebControls.DNNTab
		Dim objLabel As Label

		objTab = New DotNetNuke.UI.WebControls.DNNTab(Name)
		'objTab.ID = ID
		objLabel = New Label
		objLabel.Text = "Test text for " & Name
		objTab.Controls.Add(objLabel)

		Me.MyDNNTabStrip.Tabs.Add(objTab)

	End Sub

End Class
